package network;

import java.io.Serializable;
import java.util.Map;

public abstract class NetworkMsg implements Serializable {

	private static final long serialVersionUID = 1L;
	
	private Type type;
	
	public NetworkMsg(Type type){
		this.type = type;
	}

	/**
	 * @return the type
	 */
	public Type getType() {
		return type;
	}

	/**
	 * @return the games
	 */
	public Map<Integer,NetworkGame> getOpendGames() {
		return null;
	}
	
	/**
	 * use only when player joins a game
	 * @return the name of the player
	 */
	public String getName(){
		return null;
	}
	
	/**
	 * use only in JoinGame
	 * @return the game index
	 */
	public int getGameIndex(){
		return -1;
	}
	
	/**
	 * use only in ErrorMsg
	 * @return the error message
	 */
	public String getError(){
		return null;
	}
}
